﻿CREATE TABLE [dbo].[Employee_Deduction] (
    [id]                   INT              IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [Eid]                  INT              NULL,
    [UserName]             VARCHAR (50)     NULL,
    [EName]                NVARCHAR (50)    NULL,
    [Companyid]            INT              NULL,
    [Departmentid]         INT              NULL,
    [CompanyName]          NVARCHAR (200)   CONSTRAINT [DF_Employee_Deduction_CompanyName] DEFAULT ('') NULL,
    [DepartmentName]       NVARCHAR (200)   CONSTRAINT [DF_Employee_Deduction_DepartmentName] DEFAULT ('') NULL,
    [ApplionMoney]         DECIMAL (18, 2)  CONSTRAINT [DF_Employee_Deduction_kkje] DEFAULT ((0)) NULL,
    [ApplionMonth]         VARCHAR (50)     NULL,
    [Reason]               NVARCHAR (MAX)   CONSTRAINT [DF_Employee_Deduction_kkyy] DEFAULT ('') NULL,
    [ApplionTime]          DATETIME         CONSTRAINT [DF_Employee_Deduction_lrrq] DEFAULT (getdate()) NULL,
    [flag]                 INT              CONSTRAINT [DF_Employee_Deduction_flag] DEFAULT ((0)) NULL,
    [Proposer]             VARCHAR (50)     CONSTRAINT [DF_Employee_Deduction_lrrid] DEFAULT ('') NULL,
    [ProposerName]         NVARCHAR (50)    CONSTRAINT [DF_Employee_Deduction_lrrname] DEFAULT ('') NULL,
    [FirstAuditPerson]     VARCHAR (50)     CONSTRAINT [DF_Employee_Deduction_sprid] DEFAULT ('') NULL,
    [FirstAuditPersonName] NVARCHAR (50)    CONSTRAINT [DF_Employee_Deduction_sprname] DEFAULT ('') NULL,
    [FirstAuditDate]       DATETIME         NULL,
    [FirstMemo]            NVARCHAR (MAX)   CONSTRAINT [DF_Employee_Deduction_FirstMemo] DEFAULT ('') NULL,
    [GID]                  UNIQUEIDENTIFIER CONSTRAINT [DF_Employee_Deduction_GID] DEFAULT (newid()) NULL,
    CONSTRAINT [PK_Employee_Deduction] PRIMARY KEY CLUSTERED ([id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'扣款金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'ApplionMoney';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'扣款月份', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'ApplionMonth';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'扣款原因', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'Reason';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'状态：0：未审批，1：已通过，-1：已终止', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'flag';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入人编号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'Proposer';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'录入人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'ProposerName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批人', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'FirstAuditPerson';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批人姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'FirstAuditPersonName';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批日期', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'FirstAuditDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'审批意见', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Employee_Deduction', @level2type = N'COLUMN', @level2name = N'FirstMemo';

